import request from '@/utils/request'

// export function getEmpPage(params) {
//   return request({
//     url: '/admin/employee/page',
//     method: 'get',
//     params
//   })
// }
//

//

export default {
  getEmpPage(params) {
    return request({
      url: '/admin/employee/page',
      method: 'get',
      params
    })
  },

  deleteBatchEmp(ids) {
    return request({
      url: '/admin/employee/batch',
      method: 'delete',
      data: ids
    })
  },
  deleteEmp(id) {
    return request({
      url: '/admin/employee/' + id,
      method: 'delete'
    })
  },
  saveEmp(data) {
    return request({
      url: '/admin/employee',
      method: 'post',
      data
    })
  },
  getById(id) {
    return request({
      url: '/admin/employee/' + id,
      method: 'get'
    })
  },
  updateById(id, data) {
    return request({
      url: '/admin/employee/' + id,
      method: 'put',
      data
    })
  },
  IdentifyEmpById(id, isIdentify) {
    return request({
      url: `/admin/employee/${id}/${isIdentify}`,
      method: 'put'
    })
  }
}
